package cj.web.admin.dao;
/*
 *  
 *  
*/
import java.util.List;
import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;
import net.paoding.rose.jade.annotation.SQLParam;
import cj.web.admin.domain.AppToken;

/**
 * 
 * @author 
 *
 */
@DAO
public interface AppTokenDAO{
	
	@SQL("SELECT * FROM AppToken WHERE 1=1 #if(:t.phone!=''){ AND phone LIKE '%##(:t.phone)%' } ORDER BY createAt DESC LIMIT :t.start,:t.length ")
    List<AppToken> query(@SQLParam("t") AppToken appToken);
	
	@SQL("SELECT count(1) FROM AppToken WHERE 1=1 #if(:t.phone!=''){ AND phone LIKE '%##(:t.phone)%' } ")
    int querysize(@SQLParam("t") AppToken appToken);
    
    @SQL("select * from AppToken where id=:1")
    AppToken queryById(int id);
}